package com.acwebsitedesign.uRateDrugs.domain;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service("UserService")
public class AccountServiceImpl implements AccountService {
	
	@Autowired()
	private AccountRepository accountRepository;

	public Account getUserById(int id) {
		return accountRepository.getUserById(id);
	}
	
	public void save(Account account) {
		accountRepository.save(account);
	}

	public void removeUserByName(String username) {
		accountRepository.removeUserByName(username);
		
	}

	public Account getUserByUsername(String username) {
		return accountRepository.getUserByUsername(username);
	}

	public boolean isUsernameAvailable(String username) {
		return accountRepository.isUsernameAvailable(username);
	}
	
	


	
	


}
